package com.syxd.service;

import com.syxd.common.entity.WebResult;
import com.syxd.common.service.CrudService;
import com.syxd.dto.SysUserDTO;
import com.syxd.common.utils.UserDetail;
import com.syxd.entity.SysUserEntity;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Set;

public interface SysUserService extends CrudService<SysUserEntity, SysUserDTO> {

    WebResult getInfoFromToken(HttpServletRequest request, String name);
    Set<String> getUserPermissions(UserDetail userDetail);
    WebResult getUserPermissionsByToken(String token);
    UserDetail getByToken(String accessToken);
    WebResult changePassword(SysUserDTO login, HttpServletRequest request);
    WebResult login(HttpServletResponse response, SysUserDTO login);

    WebResult logout(HttpServletRequest request);

    void saveInfo(SysUserDTO dto);

    List<SysUserDTO> selectByLoginAccount(String loginAccount);

    void delete(Long[] ids,Integer userId);
}
